From c6fed51d96afce5fa320d87a303460843398dedf Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 13 Sep 2006 13:52:03 +0100 Subject: [PATCH] [XEN] Define -fvisibility=hidden in CFLAGS to reduce -fpic cost when compiling for x86/64. Signed-off-by: Keir Fraser --- xen/arch/x86/Rules.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index e91c8bf02d..32c8e02695 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -42,6 +42,9 @@ endif ifeq ($(TARGET_SUBARCH),x86_64) CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks CFLAGS += -fno-asynchronous-unwind-tables +# -fvisibility=hidden reduces -fpic cost, if it's available +CFLAGS += $(shell $(CC) -v --help 2>&1 | grep " -fvisibility=" | \ + grep -q hidden && echo "-fvisibility=hidden") LDFLAGS += -m elf_x86_64 x86_32 := n x86_64 := y -- 2.30.2